/*****************************************************************************/
exports.controllers={
	admin_nav: function(space,vars) {
		if (!space.admin_nav) {
			space.admin_nav=space.site.sql.execute_and_fetch("admin_nav/list",{parent_id:0});
			for (var i=0;i<space.admin_nav.length;i++) {
				space.admin_nav[i].admin_nav=space.site.sql.execute_and_fetch("admin_nav/list",{parent_id:space.admin_nav[i].id});
			}
		}
		return space.views.process("widgets/admin_nav/body",space);
	}
};

/*****************************************************************************/
